package com.fzhucc.modules.expert.repository;

import com.fzhucc.modules.expert.domain.ExpertOfflineConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @website https://eladmin.vip
* @author yyg
* @date 2023-10-20
**/
public interface ExpertOfflineConfigRepository extends JpaRepository<ExpertOfflineConfig, Integer>, JpaSpecificationExecutor<ExpertOfflineConfig> {

    @Query(nativeQuery = true, value = "select * from tt_expert_offline_config where expert_id=:expertId and is_delete=0")
    List<ExpertOfflineConfig> findByExpertId(int expertId);
}